
<?php $data = $this->paginator;    
    function loadactive($id){
        if($id == 1) return 'Đã duyệt';
        else return 'Chưa duyệt';
    }

    function loadview($id){
        if($id == 1) return 'Đã xem';
        else return 'Chưa xem';
    }

    function loadusername($id){
        Zend_loader::loadClass('Wap_Models_FriendModel');
          $db = new Wap_models_FriendModel();
          $result =  $db->loaduserinfobyid($id);
          if(isset($result[0]['Username'])){
            return $result[0]['Username'];
          }
    }
?>
<div style="text-decoration: none;font-size: 108%;color: #262626;font-weight: bold;outline: none;">Danh sách Hồ sơ</div><p></p>


<!-- <form class="form-search" name="search_sukien">
    <input type="text" placeholder="Tìm kiếm" class="input-medium search-query" name="search">

    <button type="submit" class="btn">Search</button>
</form> -->
<table style="text-align: center" class="table table-hover table-bordered">
    <tr>
        <th style="width:20px">STT</th>
        <th>Mã số</th>
        <th>Tên hồ sơ</th>
        <th>Họ tên</th>
        <th>Xét duyệt</th>
        <th>Đã xem</th>
        <th style="width:60px">Thay đổi</th>
        <th style="width:20px">Xóa</th>
        
    </tr>
    <?php $i=1; foreach($data as $item){ ?>
    <tr>
        <td style="width:20px"><?php echo $item['id'];?></td>
        <td><?php echo $item['maso'];?></td>
        <td><a href="/admin/ho-so/edit-page?id=<?php echo $item['id'] ?>"><?php echo $item['namehoso'];?></a></td>

        <td><?php echo $item['hovaten'];?></td>

        <td><?php echo loadactive($item['active']); ?></td>

        <td><?php echo loadview($item['view']); ?></td>

        <td style="text-align: center"><a href="/admin/ho-so/edit-page?id=<?php echo $item['id'] ?>"><i class="icon-pencil"></i></a></td>
        <td><a href="/admin/ho-so/del-page/?id=<?php echo $item['id'] ;?>"><i  onclick="return confirm('Are you sure?')" class="icon-trash"></i></a></td>        
    </tr>
    <?php $i++;} ?>
</table>
<?php  echo  $this->paginationControl($this->paginator, 'Sliding', 'ho-so/pagination.phtml',$params=null); ?>
